#!/bin/sh
grep --exclude="rename-sdk.sh" "c2_setError"        -lr ./ |xargs sed -i 's/c2_setError/c2_set_error/g'
grep --exclude="rename-sdk.sh" "c2_getError"        -lr ./ |xargs sed -i 's/c2_getError/c2_get_error/g'
grep --exclude="rename-sdk.sh" "c2_isLogin"         -lr ./ |xargs sed -i 's/c2_isLogin/c2_islogin/g'
grep --exclude="rename-sdk.sh" "c2_getServerInfo"   -lr ./ |xargs sed -i 's/c2_getServerInfo/c2_get_servinfo/g'
grep --exclude="rename-sdk.sh" "c2_queryDeviceV1"   -lr ./ |xargs sed -i 's/c2_queryDeviceV1/c2_query_device_v1/g'
grep --exclude="rename-sdk.sh" "c2_queryDeviceV2"   -lr ./ |xargs sed -i 's/c2_queryDeviceV2/c2_query_device_v2/g'
grep --exclude="rename-sdk.sh" "c2_startPreview"    -lr ./ |xargs sed -i 's/c2_startPreview/c2_start_preview/g'
grep --exclude="rename-sdk.sh" "c2_stopPreview"     -lr ./ |xargs sed -i 's/c2_stopPreview/c2_stop_preview/g'
grep --exclude="rename-sdk.sh" "c2_changeWndSize"   -lr ./ |xargs sed -i 's/c2_changeWndSize/c2_change_wndsize/g'

grep --exclude="rename-sdk.sh" "c2_openSound"       -lr ./ |xargs sed -i 's/c2_openSound/c2_opensound/g'
grep --exclude="rename-sdk.sh" "c2_closeSound"      -lr ./ |xargs sed -i 's/c2_closeSound/c2_colsesound/g'
grep --exclude="rename-sdk.sh" "c2_setVolume"       -lr ./ |xargs sed -i 's/c2_setVolume/c2_set_volume/g'
grep --exclude="rename-sdk.sh" "c2_setDrawCallback" -lr ./ |xargs sed -i 's/c2_setDrawCallback/c2_set_drawcb/g'
grep --exclude="rename-sdk.sh" "c2_setDecCallback"  -lr ./ |xargs sed -i 's/c2_setDecCallback/c2_set_decodecb/g'
grep --exclude="rename-sdk.sh" "c2_ptzCtrl"         -lr ./ |xargs sed -i 's/c2_ptzCtrl/c2_ptz_control/g'
grep --exclude="rename-sdk.sh" "c2_queryRecordV1"   -lr ./ |xargs sed -i 's/c2_queryRecordV1/c2_query_record_v1/g'
grep --exclude="rename-sdk.sh" "c2_queryRecordV2"   -lr ./ |xargs sed -i 's/c2_queryRecordV2/c2_query_record_v2/g'
grep --exclude="rename-sdk.sh" "c2_playbackByName"  -lr ./ |xargs sed -i 's/c2_playbackByName/c2_playback_byname/g'
grep --exclude="rename-sdk.sh" "c2_playbackByTime"  -lr ./ |xargs sed -i 's/c2_playbackByTime/c2_playback_bytime/g'
grep --exclude="rename-sdk.sh" "c2_stopPlayback"    -lr ./ |xargs sed -i 's/c2_stopPlayback/c2_stop_playback/g'
grep --exclude="rename-sdk.sh" "c2_playbackControl" -lr ./ |xargs sed -i 's/c2_playbackControl/c2_playback_control/g'
grep --exclude="rename-sdk.sh" "c2_getPlaybackTime" -lr ./ |xargs sed -i 's/c2_getPlaybackTime/c2_get_playbacktime/g'
grep --exclude="rename-sdk.sh" "c2_getPlaybackPos"  -lr ./ |xargs sed -i 's/c2_getPlaybackPos/c2_get_playbackpos/g'
grep --exclude="rename-sdk.sh" "c2_startDownload"   -lr ./ |xargs sed -i 's/c2_startDownload/c2_start_download/g'
grep --exclude="rename-sdk.sh" "c2_stopDownload"    -lr ./ |xargs sed -i 's/c2_stopDownload/c2_stop_download/g'
grep --exclude="rename-sdk.sh" "c2_getDownloadPos"  -lr ./ |xargs sed -i 's/c2_getDownloadPos/c2_get_downloadpos/g'

# grep --exclude="rename-sdk.sh" "c2_stream_cb"  -lr ./ |xargs sed -i 's/c2_stream_cb/c2_streamcb/g'
# grep --exclude="rename-sdk.sh" "c2_status_cb"  -lr ./ |xargs sed -i 's/c2_status_cb/c2_statuscb/g'
# grep --exclude="rename-sdk.sh" "c2_decode_cb"  -lr ./ |xargs sed -i 's/c2_decode_cb/c2_decodecb/g'
# grep --exclude="rename-sdk.sh" "c2_draw_cb"    -lr ./ |xargs sed -i 's/c2_draw_cb/c2_drawcb/g'
# grep --exclude="rename-sdk.sh" "c2_record_cb"  -lr ./ |xargs sed -i 's/c2_record_cb/c2_recordcb/g'
# grep --exclude="rename-sdk.sh" "c2_login_cb"   -lr ./ |xargs sed -i 's/c2_login_cb/c2_logincb/g'
# grep --exclude="rename-sdk.sh" "c2_devinfo_cb" -lr ./ |xargs sed -i 's/c2_devinfo_cb/c2_devinfocb/g'

grep --exclude="rename-sdk.sh" "PLAY_setError"      -lr ./ |xargs sed -i 's/PLAY_setError/PLAY_set_error/g'
grep --exclude="rename-sdk.sh" "PLAY_getError"      -lr ./ |xargs sed -i 's/PLAY_getError/PLAY_get_error/g'
grep --exclude="rename-sdk.sh" "PLAY_addWnd"        -lr ./ |xargs sed -i 's/PLAY_addWnd/PLAY_addwnd/g'
grep --exclude="rename-sdk.sh" "PLAY_delWnd"        -lr ./ |xargs sed -i 's/PLAY_delWnd/PLAY_delwnd/g'
grep --exclude="rename-sdk.sh" "PLAY_inputData"     -lr ./ |xargs sed -i 's/PLAY_inputData/PLAY_inputdata/g'
grep --exclude="rename-sdk.sh" "PLAY_changeWndSize" -lr ./ |xargs sed -i 's/PLAY_changeWndSize/PLAY_change_wndsize/g'

grep --exclude="rename-sdk.sh" "_setError"          -lr ./ |xargs sed -i 's/_setError/_set_error/g'
grep --exclude="rename-sdk.sh" "_getError"          -lr ./ |xargs sed -i 's/_getError/_get_error/g'
grep --exclude="rename-sdk.sh" "_addWnd"            -lr ./ |xargs sed -i 's/_addWnd/_addwnd/g'
grep --exclude="rename-sdk.sh" "_delWnd"            -lr ./ |xargs sed -i 's/_delWnd/_delwnd/g'
grep --exclude="rename-sdk.sh" "_inputData"         -lr ./ |xargs sed -i 's/_inputData/_inputdata/g'
grep --exclude="rename-sdk.sh" "_changeWndSize"     -lr ./ |xargs sed -i 's/_changeWndSize/_change_wndsize/g'
